<!DOCTYPE html>
<html lang="en">

	<include file="Public:header" />
	<include file="Public:page_css" />
 
	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">

		<include file="Public:nav" />
		<div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-12">
                <h2>订单列表</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="{:U('Index/index')}"><i class="fa fa-home"></i> 主页</a>
                    </li>
                    <li>订单管理</li>
                    <li><strong>订单列表</strong></li>
                </ol>
            </div>              
        </div>
        <br />
		<link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/sldate/daterangepicker-bs3.css" />
		<script src="__PUBLIC__/Admin/js/jquery.min.js"></script>	
		<script type="text/javascript" src="__PUBLIC__/sldate/moment.js"></script>
		<script type="text/javascript" src="__PUBLIC__/sldate/daterangepicker.js"></script>
		<script type="text/javascript">
               $(document).ready(function() {
                  $('#reservation').daterangepicker(null, function(start, end, label) {
                    console.log(start.toISOString(), end.toISOString(), label);
                  });
               });
        </script>
        <div class="row">
			<div class="col-sm-12">							    				  
			    <form name="admin_list_sea" class="form-search" method="post" action="__URL__/audit">
					<div  class="col-sm-2">
						<div class="input-group" style="width: 240px">	
						<span class="input-group-addon"><i class="fa fa-calendar"></i></span>							
							<input type="text" class="form-control" name="reservation" id="reservation" class="sl-date" value="{$s}" placeholder="点击选择下单日期"/>	
						</div>
					</div>
					<div class="col-sm-3">
						<div class="input-group">
							<input type="text" name="key" id="key" class="form-control" value="{$val}" placeholder="输入需查询的姓名" />	
							<span class="input-group-btn"> 
				            	<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button> 
				            </span>
						</div>
					</div>
				</form>	
				<div class="col-sm-1">
					<div class="input-group">
			            <a href="{:U('Order/add_order')}" class="btn btn-primary">添加订单</a>
			        </div>
			    </div>			   			    
			</div>
		</div>		
		
		<br />
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5><i class="fa fa-tasks"></i> 用户列表</h5>
					</div>
					<div class="ibox-content">
					<form id="leftnav" name="leftnav" method="post" action="" >
                    <input type="hidden" name="checkk" id="checkk" value="1" />
                   
						<table class="table table-bordered">
							<thead>
								<tr class="long-tr">
									<th width="5%">ID</th>
									<th width="5%">数量</th>
									<th width="10%">姓名</th>
									<th width="10%">下单时间</th>
									<th width="10%">审核时间</th>
									<th width="10%">身份证号</th>
									<th width="10%">手机号</th>
									<th width="10%">订单备注</th>
									<th width="10%">操作</th>
								</tr>
							</thead>

							<volist name="list" id="vo">
								<tr class="long-td">  
								  	<td>{$vo.orderid}</td>
								  	<td>{$vo.order_num}</td>
								  	<td>{$vo.truename}</td>
									<td>{$vo.addtime}</td>
									<td>
									<eq name="vo.paystatus" value="1">{$vo.audit_time|date="Y-m-d H:i:s",###}<else/>未审核</eq>

									</td>
									<td>{$vo.idcard}</td>
									<td>{$vo.mobile}</td>
									<td>{$vo.orderdesc}</td>
									<td>
										<eq name="vo.paystatus" value="1">
											已审核
										<else/><a href="{:U('edit',array('orderid'=>$vo['orderid']))}" class="btn btn-primary btn-xs">
											<i class="fa fa-paste"></i> 审核</a>&nbsp;&nbsp;</eq>
										


										<a onclick="return del({$vo.orderid});" href="javascript:;" class="btn btn-danger btn-xs">
											<i class="fa fa-trash-o"></i> 删除</a>
									</td>
								</tr>
							</volist>	
							<tbody id="article_list"></tbody>
							
						</table>
					
					</form>
						
					<!-- <div id="AjaxPage" style=" text-align: right;"></div>
											
					</div> -->

					<div class="pages" style=" text-align: right;">
							{$page}
						</div>
				</div>
			</div>
		</div>

	<include file="Public:footer" />

	</body>
<link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/sweetalert/sweetalert.css" />
		<script type="text/javascript" src="__PUBLIC__/sweetalert/sweetalert.min.js"></script>

	<script>




		function del(id) {


swal({
       title: "操作提示",   //弹出框的title
       text: "确定删除吗？",  //弹出框里面的提示文本
       type: "warning",    //弹出框类型
       showCancelButton: true, //是否显示取消按钮
       confirmButtonColor: "#DD6B55",//确定按钮颜色
       cancelButtonText: "取消",//取消按钮文本
       confirmButtonText: "是的，确定删除！",//确定按钮上面的文档
       closeOnConfirm: true
     }, function () {

     	$.post(
                '__CONTROLLER__/delorder',
                {id:id},
                function(data){
                    if(data==1){
                        swal("删除成功")
                        location.reload();

                    } else {
                    
                    }
                },
                "json"
            );
         
     });

			 
		}
	</script>

</html>

